﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Data;
using System.Data.SqlClient;

/// <summary>
/// Summary description for DA_NGANH_THUOC_TRUONG
/// </summary>
namespace DAL
{
    /// <summary>
    /// Summary description for DA_NGANH_THUOC_TRUONG
    /// </summary>
    public class DA_NGANH_THUOC_TRUONG : DbObject
    {
        protected SqlConnection connec;
        public DA_NGANH_THUOC_TRUONG(SqlConnection Connection)
        {
            connec = Connection;
            //
            // TODO: Add constructor logic here
            //
        }
        public DataSet load_danh_sach_nganh(int i_id_truong, string str_ten_nganh)
        {
            SqlParameter[] parameters =  {	
                                             new SqlParameter("@ID_TRUONG", SqlDbType.Int,4) ,
                                             new SqlParameter("@TEN_NGANH", SqlDbType.NVarChar,100)                               
										 };
            // set the 0values
            parameters[0].Value = i_id_truong;
            parameters[1].Value = str_ten_nganh;
            // create the parameter
            DataSet ds_dm_truong = RunProcedure("sp_DM_NGANH_THUOC_TRUONG", parameters, "DM_NGANH_THUOC_TRUONG", connec);
            return ds_dm_truong;
        }
    }
}